package com.hxc.luckymoney;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
// @Controller + @ResponseBody = @RestController
@RestController
@RequestMapping("/hello")
public class HelloController {

//    @Value("${minMoney}")
//    private BigDecimal minMoney;
//    @Value("${description}")
//    private String description;

    @Autowired
    private LimitConfig limitConfig;

//    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    @GetMapping("/say")
    public String say(@RequestParam(value = "id", required = false, defaultValue = "0") Integer id){
//        return "说明：" + limitConfig.getDescription();
        return "id：" + id;
    }
}
